﻿/*=========================================================================
	TASK 1:                                        {Conditional Statements}
	Write an if statement that examines two integer variables and 
    exchanges their values if the first one is greater than the second one. 
=========================================================================*/

using System;

class ExchangeGreaterOneWithsecondVariable
{
    static void Main()
    {
        Console.Write("first number=");
        int firstNum = int.Parse(Console.ReadLine());

        Console.Write("second number=");
        int secondNum = int.Parse(Console.ReadLine());
        int exchage;

        if (firstNum > secondNum)
        {
            Console.WriteLine("first number={0} > second number={1}",firstNum,secondNum);
            exchage=firstNum;
            firstNum = secondNum;
            secondNum = exchage;
            Console.WriteLine("After exchange first number={0}",firstNum);
            Console.WriteLine("After exchange second number={0}", secondNum);
        }
        else
        {
            Console.WriteLine("\nNo exchange needed:\nfirst number={0} < second number={1}\n",firstNum,secondNum);
        }
    }
}

